package com.doryar.girl.service;

import com.doryar.girl.domain.Girl;
import com.doryar.girl.repository.GirlRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class GirlService {
    @Autowired
   private GirlRepository girlRepository;
    @Transactional
    public void insertTwo(){
        Girl girlA=new Girl();
        girlA.setAge(21);
        girlA.setCupSize("B");
        girlRepository.save(girlA);

        Girl girlB=new Girl();
        girlB.setAge(14);
        girlB.setCupSize("G");
        girlRepository.save(girlB);
    }
}
